package com.kg.sdk.dlg;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.kg.sdk.util.Helper;

public class KPDlgTip extends KPDialogBase implements View.OnClickListener {
    private TextView tvTip;
    public KPDlgTip(Context context) {
        super(context, Helper.getStyleResId(context,"DGDialog_NoTitle_Transparent"));
        initView();
    }

    @Override
    public void onClick(View view) {
        closeDialog();
    }

    protected void initView(){
        View  mMainView = getMainView();
        setContentView(mMainView);
    }
    protected View getMainView() {
        int layoutId = Helper.getLayoutResId(getContext(),"dlg_tip");
        View view = LayoutInflater.from(getContext()).inflate(layoutId,null);
        tvTip = (TextView)view.findViewById(Helper.getIdResId(getContext(),"tvTip"));
        View btnCancel = (TextView) view.findViewById(Helper.getIdResId(getContext(),"btnExit"));
        btnCancel.setOnClickListener(this);

        return view;
    }

    public void setTip(String tip){
        tvTip.setText(tip);
    }

}
